<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@ include file="/WEB-INF/jsp/include/head.jsp"%>
<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator"
	prefix="decorator"%>
<%@ taglib uri="http://www.opensymphony.com/sitemesh/page" prefix="page"%>
<link rel="stylesheet" href="<%=WEBPATH%>/themes/dafault/xtree.css"
	type="text/css">
<link rel="stylesheet" href="<%=WEBPATH%>/themes/style.css"
	type="text/css">
<script type="text/javascript"
	src="<%=WEBPATH%>/dwr/engine.js?id=<%=generate%>"></script>
<script type="text/javascript"
	src="<%=WEBPATH%>/dwr/util.js?id=<%=generate%>"></script>
<script type="text/javascript"
	src="<%=WEBPATH%>/dwr/interface/HomeAction.js?id=<%=generate%>"></script>
<script language="javascript" type="text/javascript"
	src="<%=WEBPATH%>/scripts/WdatePicker.js?s=<%=generate%>"></script>
<script language="javascript" type="text/javascript"
	src="<%=WEBPATH%>/scripts/global.js?s=<%=generate%>"></script>
<script type="text/javascript"
	src="<%=WEBPATH%>/scripts/xtree/xtree.js?s=<%=generate%>"></script>
<script type="text/javascript"
	src="<%=WEBPATH%>/scripts/AjaxAnywhere.js?s=<%=generate%>"></script>
<script type="text/javascript"
	src="<%=WEBPATH%>/scripts/xtree/xmlextras.js?s=<%=generate%>"></script>
<script type="text/javascript"
	src="<%=WEBPATH%>/scripts/xtree/xloadtree.js?s=<%=generate%>"></script>
<script type="text/javascript" charset="UTF-8"
	src="<%=WEBPATH%>/scripts/jquery/jquery.js?s=<%=generate%>"></script>
<script type="text/javascript">
function forward(url) {
	parent.frames["mainFrame"].location.href=url;
}
function show(num,msize,child,id){ 
	var state=_$("tr0_"+num).getAttribute("state");  
	if(state==1){
		_$("tr0_"+num).setAttribute("state","0");
		_$("tr1_"+num).style.display = "";   
		_$("img_"+num).src="<%=WEBPATH%>/images/shousuo.png"; 
		DWRUtil.useLoadingMessage();
		HomeAction.queryChildByDwr(id,ajaxJs(num));
	}else{
		_$("tr0_"+num).setAttribute("state","1");
		_$("tr1_"+num).style.display = "none";  
		_$("img_"+num).src="<%=WEBPATH%>/images/zhankai.png";
	}  
	hide(num,msize);
}
function showChild(id,num){
	HomeAction.queryChildByDwr(id,ajaxJs(num));
}
function ajaxJs(num){  
	return function(data){
		var cellFuncs =function(index) {
			var template="";

			if(index.child>0){
				template="<table class=\"buttom_line\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" align=\"center\" onmouseout=\"this.style.cursor='auto';\" onmouseover=\"this.style.cursor='default';\" style=\"cursor: default;\">";
				template=template+"<tr><td class=\"bgstyle\" height=\"23\" background=\"<%=WEBPATH%>/images/zcdbj.png\" onmouseout=\"this.className='bgstyle';\" onmouseover=\"this.className='bgstyle1';\" onclick=\"javascript:showChild('"+index.id+"','"+index.id+"');\">";
				template=template+"<table width=\"90%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" align=\"center\">";
				template=template+"<tr><td width=\"23\" height=\"23\"><div align=\"center\">";
				template=template+"<img width=\"17\" height=\"17\" src=\"<%=WEBPATH%>/images/menu/khbf.png\"/> </div> </td>";
				template=template+"	<td class=\"unnamed1\">"+index.name+"</td></tr>";
				template=template+"	<tr id=\"tr1_"+index.id;
				template=template+"\"><td id=\"td1_"+index.id+"\"></td></tr>";
				template=template+"</table></td></tr></table>";
			}else{
				template="<table class=\"buttom_line\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" align=\"center\" onmouseout=\"this.style.cursor='auto';\" onmouseover=\"this.style.cursor='default';\" style=\"cursor: default;\">";
				template=template+"<tr><td class=\"bgstyle\" height=\"23\" background=\"<%=WEBPATH%>/images/zcdbj.png\" onmouseout=\"this.className='bgstyle';\" onmouseover=\"this.className='bgstyle1';\" onclick=\"forward('<%=WEBPATH%>/"+index.forward+"')\">";
				template=template+"<table width=\"90%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" align=\"center\">";
				template=template+"<tr><td width=\"23\" height=\"23\"><div align=\"center\">";
				template=template+"<img width=\"17\" height=\"17\" src=\"<%=WEBPATH%>/images/menu/khbf.png\"/> </div> </td>";
				template=template+"	<td class=\"unnamed1\">"+index.name+"</td></tr>";
				template=template+"</table></td></tr></table>";
			}
			return template;}; 
		var StringInner="";
		for(var i=0;i<data.length;i++){
			var index=data[i]; 
			StringInner=StringInner+cellFuncs(index); 
		}
		//alert(num);
			_$("td1_"+num).innerHTML=StringInner;
			//jQuery("tr1_"+num).show(); 
			_$("tr1_"+num).style.display = "";
		};
	
}
function hide(num,msize){
	for(var i=0; i<msize; i++){
		if(i!=num){
			var state =_$("tr0_"+i).getAttribute("state");
			if(state!=1){  
				_$("tr0_"+i).setAttribute("state","1");
				_$("tr1_"+i).style.display = "none"; 
				_$("img_"+i).src="<%=WEBPATH%>/images/zhankai.png"; 
			}
		}
	}
}
</script>
</head>
<body>
<table width="100%" border="0" style="border-top: 1px solid #B1B9CA"
	cellspacing="0" cellpadding="0" style="margin-left:2px;">
	<tr>
		<td class="buttom_lr_line" width="100%" height="27"
			background="<%=WEBPATH%>/images/zcdbtbj.png">
		<div align="center" style="font-weight: bold; color: #002E69">操作菜单</div>
		</td>
	</tr>
	<tr>
		<td>
		<table width="100%" cellspacing="0" cellpadding="0" border="0"
			bgcolor="#d3dae1">
			<html:iterator id="leftSystemMenu" value="menuChildBeans"
				status="status">
				<tr id="tr0_<html:property value="#status.index" />" state="1"
					onclick="show('<html:property value="#status.index" />','<html:property value="icountMenu" />',<html:property value="child" />,'<html:property value="id" />');">
					<td class="buttom_lr_line" height="22"
						background="<%=WEBPATH%>/images/zlmbtbj.png"
						onmouseout="this.style.cursor='auto';"
						onmouseover="this.style.cursor='default';" style="cursor: auto;">
					<table width="97%" cellspacing="0" cellpadding="0" border="0"
						align="center">
						<tbody>
							<tr>
								<td width="23" height="22">
								<div align="center"><img width="17" height="17"
									src="<%=WEBPATH%>/images/menu/khgl.png" /></div>
								</td>
								<td class="fBlack"><html:property value="name" /></td>
								<td width="25">
								<div align="center"><img
									id="img_<html:property value="#status.index" />"
									src="<%=WEBPATH%>/images/zhankai.png" /></div>
								</td>
							</tr>
						</tbody>
					</table>
					</td>
				</tr>
				<tr id="tr1_<html:property value="#status.index" />"
					style="display: none;">
					<td id="td1_<html:property value="#status.index" />"
						class="buttom_lr_line"
						style="background-color: rgb(250, 252, 255);"></td>
				</tr>
			</html:iterator>
		</table>
		</td>
	</tr>
</table>
</body>

</html>



